package com.edfu.core.commons.service.api;

import java.util.List;

import org.springframework.security.access.prepost.PreAuthorize;

import com.edfu.core.commons.beans.EduObjectType;
import com.edfu.core.commons.beans.Rating;

public interface IRatingService {
	
	@PreAuthorize("isAnonymous()")
	public Rating addRating(Rating rating);
	
	@PreAuthorize("isAnonymous()")
	public double getMeanRating(long objectId, EduObjectType objectType);
	
	@PreAuthorize("isAnonymous()")
	public long getRatingCount(long objectId, EduObjectType objectType);
	
	@PreAuthorize("isAnonymous()")
	public List<Rating> getRatings(long objectId, EduObjectType objectType);
	
	@PreAuthorize("isAnonymous()")
	public Rating getUserRating(String userId, long objectId, EduObjectType objectType);	

}
